<?php


namespace app\middleware;


class LoginMiddleware
{
    public function handle($request, \Closure $next)
    {

        if (!session("username")) {
            return redirect(url('login/index'));
        }
        return $next($request);
    }
}